package io.springboot.jpa.examples.springbootjpaexamples.service;

import io.springboot.jpa.examples.springbootjpaexamples.model.Enterprise;
import io.springboot.jpa.examples.springbootjpaexamples.repository.EnterpriseRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author yzc
 * @description
 * @date 2018/9/10
 */
@Service
public class EnterpriseService {

    @Autowired
    private EnterpriseRepository enterpriseRepository;

    @Transactional
    public Enterprise save(Enterprise enterprise) {
        return enterpriseRepository.save(enterprise);
    }
}
